from django.conf.urls import url
from django.views.generic import TemplateView
from django.contrib.auth.decorators import login_required

from apps.users.views import UserInfoView, UploadImageView, ChangePwdView, ChangeMobileView, MyMessageView, \
    MyHomeWorkView, MyScoreView, MyDisCussScoreView, MyGradeClassificationView, MyDiscussChartView, MyTeachCourseView, \
    MyScoreListView, MyDiscussListView, MyDiscussListDeatilView

from apps.users.views import MyFavOrgView, MyFavTeacherView, MyFavCourseView, MyCourse

urlpatterns = [
    url(r'^info/$', UserInfoView.as_view(), name="info"),
    url(r'^image/upload/$', UploadImageView.as_view(), name="image"),
    url(r'^update/pwd/$', ChangePwdView.as_view(), name="update_pwd"),
    url(r'^update/mobile/$', ChangeMobileView.as_view(), name="update_mobile"),
    # # url(r'^mycourse/$', MyCourseView.as_view(), name="mycourse"),
    # url(r'^mycourse/$', login_required(TemplateView.as_view(template_name="usercenter-mycourse.html"), login_url="/login/"),{"current_page":"mycourse"}, name="mycourse"),
    url(r'^mycourse/$', MyCourse.as_view(), name="mycourse"),
    url(r'^myfavorg/$', MyFavOrgView.as_view(), name="myfavorg"),
    url(r'^myfav_teacher/$', MyFavTeacherView.as_view(), name="myfav_teachers"),
    url(r'^myfav_course/$', MyFavCourseView.as_view(), name="myfav_course"),
    url(r'^messages/$', MyMessageView.as_view(), name="messages"),
    url(r'^my_homework/$', MyHomeWorkView.as_view(), name="my_homework"),
    url(r'^my_score/$',  MyScoreView.as_view(), name="my_score"),
    url(r'^my_discuss_score/$', MyDisCussScoreView.as_view(), name="my_discuss_score"),
    url(r'^my_grade_classfication/$',MyGradeClassificationView.as_view(), name="my_grade_classfication"),
    url(r'^my_discuss_charts/$',MyDiscussChartView.as_view(), name="my_discuss_charts"),
    url(r'^my_teach/$',MyTeachCourseView.as_view(), name="my_teach"),
    url(r'^my_score_list/$', MyScoreListView.as_view(), name="my_score_list"),
    url(r'^my_discuss_list/$', MyDiscussListView.as_view(), name="my_discuss_list"),
    url(r'^my_discuss_detail_list/$', MyDiscussListDeatilView.as_view(), name="my_discuss_detail_list"),
]
